import time
import schedule
from footballFulFuturel import footballFullFuture
from basketballFuturel import basketballFuturel

nba = 'http://lq3.titan007.com/nba.htm'
football = "http://live.titan007.com/oldIndexall.aspx"


def job():
    if __name__ == '__main__':
        run_footballFullFuture = footballFullFuture(football)
        run_footballFullFuture.main()
        run_basketballFuturel = basketballFuturel(nba)
        run_basketballFuturel.main()


# 这里选择每10秒运行一次上面的函数。
schedule.every().day.at("02:00").do(job)

# 这一步是必须的，运行schedule
while True:
    schedule.run_pending()
    time.sleep(1)
